package com.hb.demo.entity;

import cn.hutool.json.JSONUtil;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class LoginModel {
    private AdminUser user;
    private String token;

    public static LoginModel get(AdminUser user, String token) {
        LoginModel model = new LoginModel();
        model.setUser(user);
        model.setToken(token);
        return model;
    }

    @Override
    public String toString() {
        return JSONUtil.parseObj(this).toString();
    }
}
